<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Category extends Model
{
    public function getAvatarAttribute($value){
        $img = ProductImage::find($value);
        if ($img){
            return $img->url;
        }
        return null;
    }
}
